<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book 我的电子书 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>面试题 | 我的电子书</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.9">
        <meta name="author" content="Melon">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-image-captions/image-captions.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/02css/displayvisibility.html" />
    
    
    <link rel="prev" href="../../md/02css/element_center.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="2.3"
        data-chapter-title="面试题"
        data-filepath="md/02css/Interview.md"
        data-basepath="../.."
        data-revision="Mon Jun 08 2020 19:44:34 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/01html/01label.html">
            
                
                    <a href="../../md/01html/01label.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML标签
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/01html/boxmodel.html">
            
                
                    <a href="../../md/01html/boxmodel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/01html/nvmgitbook.html">
            
                
                    <a href="../../md/01html/nvmgitbook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        nvm和gitbook
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/02css/index.html">
            
                
                    <a href="../../md/02css/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        css
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/02css/01selector.html">
            
                
                    <a href="../../md/02css/01selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/02css/element_center.html">
            
                
                    <a href="../../md/02css/element_center.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        元素垂直居中的方法
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.3" data-path="md/02css/Interview.html">
            
                
                    <a href="../../md/02css/Interview.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        面试题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/02css/displayvisibility.html">
            
                
                    <a href="../../md/02css/displayvisibility.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        元素的显示模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="md/02css/float.html">
            
                
                    <a href="../../md/02css/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="md/02css/media.html">
            
                
                    <a href="../../md/02css/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        media媒体查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="md/02css/position.html">
            
                
                    <a href="../../md/02css/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="md/02css/textoverflow.html">
            
                
                    <a href="../../md/02css/textoverflow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文本溢出处理
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >我的电子书</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x90A3;&#x4E9B;&#x9762;&#x8BD5;&#x4F1A;&#x88AB;&#x95EE;&#x5230;&#x7684;&#x95EE;&#x9898;&#xFF08;htmlcss&#x7BC7;&#xFF09;">&#x90A3;&#x4E9B;&#x9762;&#x8BD5;&#x4F1A;&#x88AB;&#x95EE;&#x5230;&#x7684;&#x95EE;&#x9898;&#xFF08;html+css&#x7BC7;&#xFF09;</h1>
<h3 id="1-html5&#x65B0;&#x589E;&#x4E86;&#x54EA;&#x4E9B;&#x6807;&#x7B7E;&#xFF1F;">1. html5&#x65B0;&#x589E;&#x4E86;&#x54EA;&#x4E9B;&#x6807;&#x7B7E;&#xFF1F;</h3>
<ul>
<li>&#x65B0;&#x589E;<code>canvas</code>&#x6807;&#x7B7E;</li>
<li><code>video</code>&#x548C;<code>audio</code> &#x97F3;&#x9891;&#x548C;&#x89C6;&#x9891;&#x6807;&#x7B7E;&#xFF08;&#x6D41;&#x5A92;&#x4F53;&#xFF09;</li>
<li>&#x81EA;&#x5B9A;&#x4E49;&#x6807;&#x7B7E; &#x6BD4;&#x5982;<code>header</code>&#xFF0C;<code>nav</code>&#xFF0C;<code>footer</code>&#xFF0C;<code>article</code></li>
<li>&#x65B0;&#x7684;<code>input</code>&#x63A7;&#x4EF6;&#xFF0C;&#x6BD4;&#x5982;<code>date</code></li>
</ul>
<h3 id="2-visibility&#x548C;display&#x7684;&#x533A;&#x522B;&#xFF1F;">2. visibility&#x548C;display&#x7684;&#x533A;&#x522B;&#xFF1F;</h3>
<ul>
<li><code>display:none</code>&#x9690;&#x85CF;&#x540E;&#x7684;&#x5143;&#x7D20;&#x4E0D;&#x5360;&#x636E;&#x4EFB;&#x4F55;&#x7A7A;&#x95F4;</li>
<li><code>visitbility:hidden</code>&#x9690;&#x85CF;&#x7684;&#x5143;&#x7D20;&#x7A7A;&#x95F4;&#x4F9D;&#x65E7;&#x4FDD;&#x7559;</li>
</ul>
<h3 id="3-&#x6E05;&#x9664;&#x6D6E;&#x52A8;&#x7684;&#x65B9;&#x6CD5;">3. &#x6E05;&#x9664;&#x6D6E;&#x52A8;&#x7684;&#x65B9;&#x6CD5;</h3>
<ul>
<li>&#x989D;&#x5916;&#x6807;&#x7B7E;&#x6CD5;</li>
<li><p>&#x7236;&#x5143;&#x7D20;&#x6DFB;&#x52A0;<code>after</code>&#x4F2A;&#x7C7B;</p>
<pre><code class="lang-css"><span class="hljs-pseudo">::after</span><span class="hljs-rules">{
  <span class="hljs-rule"><span class="hljs-attribute">content</span>:<span class="hljs-value"><span class="hljs-string">&apos;&apos;</span></span></span>;
  <span class="hljs-rule"><span class="hljs-attribute">display</span>:<span class="hljs-value">block</span></span>;
  <span class="hljs-rule"><span class="hljs-attribute">height</span>:<span class="hljs-value"><span class="hljs-number">0</span></span></span>;
  <span class="hljs-rule"><span class="hljs-attribute">clear</span>:<span class="hljs-value">both</span></span>;
}</span>
</code></pre>
</li>
<li><p>&#x7ED9;&#x7236;&#x5143;&#x7D20;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x9AD8;&#x5EA6;</p>
</li>
<li>&#x7ED9;&#x7236;&#x5143;&#x7D20;&#x6DFB;&#x52A0;<code>overflow&#xFF1A;hidden</code>&#x5C5E;&#x6027;<h4 id="&#x7B2C;1&#xFF0C;2&#x70B9;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#xFF0C;3-4&#x4E0D;&#x63A8;&#x8350;">&#x7B2C;1&#xFF0C;2&#x70B9;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#xFF0C;3 4&#x4E0D;&#x63A8;&#x8350;</h4>
</li>
</ul>
<h3 id="4-&#x5143;&#x7D20;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x65B9;&#x6CD5;">4. <a href="element_center.html">&#x5143;&#x7D20;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x65B9;&#x6CD5;</a></h3>
<h3 id="5-link-&#x548C;-import&#x7684;&#x533A;&#x522B;">5. link &#x548C; @import&#x7684;&#x533A;&#x522B;</h3>
<ul>
<li>&#x8BED;&#x6CD5;&#x7684;&#x7ED3;&#x6784;&#x4E0D;&#x540C;<ul>
<li><code>link</code>&#x901A;&#x8FC7;html&#x6807;&#x7B7E;&#xFF0C;&#x53EA;&#x80FD;&#x653E;&#x5728;&#x6E90;&#x4EE3;&#x7801;&#x4E2D;&#x4F7F;&#x7528;</li>
<li><code>@import</code> &#x770B;&#x4F5C;css&#x6837;&#x5F0F;&#x53BB;&#x5F15;&#x5165;</li>
</ul>
</li>
<li>&#x517C;&#x5BB9;&#x6027;<ul>
<li><code>@import</code> <code>css2.1</code>&#x524D;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#xFF0C;&#x4F7F;&#x7528;<code>css3</code>&#x5C31;&#x4F7F;&#x7528;&#x4E0D;&#x4E86;&#xFF0C;&#x9700;&#x8981;<code>link</code> <code>css3</code>&#xFF0C;&#x7531;&#x4E8E;<code>@import</code>&#x662F;<code>CSS2.1</code>&#x63D0;&#x51FA;&#x7684;&#x6240;&#x4EE5;&#x8001;&#x7684;&#x6D4F;&#x89C8;&#x5668;&#x4E0D;&#x652F;&#x6301;&#xFF0C;<code>@import</code>&#x53EA;&#x6709;&#x5728;<code>IE5</code>&#x4EE5;&#x4E0A;&#x7684;&#x624D;&#x80FD;&#x8BC6;&#x522B;&#xFF0C;&#x800C;<code>link</code>&#x6807;&#x7B7E;&#x65E0;&#x6B64;&#x95EE;&#x9898;&#xFF0C;&#x5B8C;&#x5168;&#x517C;&#x5BB9;&#x3002;</li>
</ul>
</li>
<li>&#x52A0;&#x8F7D;&#x987A;&#x5E8F;&#x7684;&#x4E0D;&#x540C;<ul>
<li>&#x4E00;&#x4E2A;&#x9875;&#x9762;&#x88AB;&#x5939;&#x5728;&#x7684;&#x65F6;&#x5019;&#xFF08;&#x5C31;&#x662F;&#x88AB;&#x6D4F;&#x89C8;&#x8005;&#x6D4F;&#x89C8;&#x7684;&#x65F6;&#x5019;&#xFF09;&#xFF0C;<code>link</code>&#x5F15;&#x7528;&#x7684;<code>CSS</code>&#x4F1A;&#x540C;&#x65F6;&#x88AB;&#x52A0;&#x8F7D;&#xFF0C;&#x800C;<code>@import</code>&#x5F15;&#x7528;&#x7684;<code>CSS</code>&#x4F1A;&#x7B49;&#x5230;&#x9875;&#x9762;&#x5168;&#x90E8;&#x88AB;&#x4E0B;&#x8F7D;&#x5B8C;&#x518D;&#x52A0;&#x8F7D;&#x3002;&#x6240;&#x4EE5;&#x6709;&#x65F6;&#x5019;&#x6D4F;&#x89C8;<code>@import</code>&#x52A0;&#x8F7D;<code>CSS</code>&#x7684;&#x9875;&#x9762;&#x65F6;&#x4F1A;&#x6CA1;&#x6709;&#x6837;&#x5F0F;&#xFF08;&#x5C31;&#x662F;&#x95EA;&#x70C1;&#xFF09;&#xFF0C;&#x7F51;&#x901F;&#x6162;&#x7684;&#x65F6;&#x5019;&#x8FD8;&#x633A;&#x660E;&#x663E;&#x3002;</li>
</ul>
</li>
<li>&#x6743;&#x91CD;&#x7684;&#x533A;&#x522B;<ul>
<li><code>link</code>&#x65B9;&#x5F0F;&#x7684;&#x6837;&#x5F0F;&#x7684;&#x6743;&#x91CD;&#x9AD8;&#x4E8E;<code>import</code>&#x7684;&#x6743;&#x91CD;</li>
</ul>
</li>
</ul>
<h3 id="6-css&#x4F18;&#x5148;&#x7EA7;&#x7B97;&#x6CD5;&#x5982;&#x4F55;&#x8BA1;&#x7B97;">6. CSS&#x4F18;&#x5148;&#x7EA7;&#x7B97;&#x6CD5;&#x5982;&#x4F55;&#x8BA1;&#x7B97;</h3>
<ul>
<li>&#x5143;&#x7D20;&#x9009;&#x62E9;&#x7B26;&#xFF1A;1</li>
<li><code>class</code>&#x9009;&#x62E9;&#x7B26;&#xFF1A;10</li>
<li><code>id</code>&#x9009;&#x62E9;&#x7B26;&#xFF1A;100</li>
<li>&#x5143;&#x7D20;&#x6807;&#x7B7E;&#xFF1A;1000<h5 id="important&#x58F0;&#x660E;&#x7684;&#x6837;&#x5F0F;&#x4F18;&#x5148;&#x7EA7;&#x6700;&#x9AD8;&#xFF0C;&#x5982;&#x679C;&#x51B2;&#x7A81;&#x5728;&#x8FDB;&#x884C;&#x8BA1;&#x7B97;&#x3002;">!important&#x58F0;&#x660E;&#x7684;&#x6837;&#x5F0F;&#x4F18;&#x5148;&#x7EA7;&#x6700;&#x9AD8;&#xFF0C;&#x5982;&#x679C;&#x51B2;&#x7A81;&#x5728;&#x8FDB;&#x884C;&#x8BA1;&#x7B97;&#x3002;</h5>
<h5 id="&#x5982;&#x679C;&#x4F18;&#x5148;&#x7EA7;&#x76F8;&#x540C;&#xFF0C;&#x5219;&#x9009;&#x62E9;&#x6700;&#x540E;&#x51FA;&#x73B0;&#x7684;&#x6837;&#x5F0F;&#x3002;">&#x5982;&#x679C;&#x4F18;&#x5148;&#x7EA7;&#x76F8;&#x540C;&#xFF0C;&#x5219;&#x9009;&#x62E9;&#x6700;&#x540E;&#x51FA;&#x73B0;&#x7684;&#x6837;&#x5F0F;&#x3002;</h5>
<h5 id="&#x7EE7;&#x627F;&#x5F97;&#x5230;&#x7684;&#x6837;&#x5F0F;&#x7684;&#x4F18;&#x5148;&#x7EA7;&#x6700;&#x4F4E;">&#x7EE7;&#x627F;&#x5F97;&#x5230;&#x7684;&#x6837;&#x5F0F;&#x7684;&#x4F18;&#x5148;&#x7EA7;&#x6700;&#x4F4E;</h5>
</li>
</ul>
<h3 id="7-&#x76D2;&#x5B50;&#x6A21;&#x578B;&#x6709;&#x54EA;&#x4E9B;&#xFF1F;">7. &#x76D2;&#x5B50;&#x6A21;&#x578B;&#x6709;&#x54EA;&#x4E9B;&#xFF1F;</h3>
<ul>
<li>w3c&#x6807;&#x51C6;&#x76D2;&#x5B50;&#x6A21;&#x578B;</li>
<li>ie&#x76D2;&#x5B50;&#x6A21;&#x578B;<h5 id="&#x901A;&#x8FC7;boxsizing&#x8BBE;&#x7F6E;">&#x901A;&#x8FC7;<code>box-sizing</code>&#x8BBE;&#x7F6E;</h5>
</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/02css/element_center.html" class="navigation navigation-prev " aria-label="Previous page: 元素垂直居中的方法"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/02css/displayvisibility.html" class="navigation navigation-next " aria-label="Next page: 元素的显示模式"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"image-captions":{"attributes":{"style":"left: 50%;position: relative;transform: translateX(-50%);"},"caption":"图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","align":"center","variable_name":"_pictures"},"fontsettings":{"theme":"night","family":"sans","size":2},"toggle-chapters":{},"highlight":{}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book 我的电子书 -->
</html>
